<template>
  <div class="aside-container">
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#f00000"
      @open="handleOpen"
      @close="handleClose"
      router
    >
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-s-custom"></i>
          <span slot="title">学生信息录入和查询</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/home/stuinfoentry">学生信息录入</el-menu-item>
          <el-menu-item index="/home/stuinfoselect">学生信息查询</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-search"></i>
          <span slot="title">成绩录入及查询</span>
        </template>
        <el-menu-item-group>
          <template slot="title">入学</template>
          <el-menu-item index="2-1">入学成绩录入</el-menu-item>
          <el-menu-item index="2-2">入学成绩查询</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group>
          <template slot="title">其中</template>
          <el-menu-item index="2-3">期中成绩录入</el-menu-item>
          <el-menu-item index="2-4">期中成绩查询</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group>
          <template slot="title">期末</template>
          <el-menu-item index="2-5">期末成绩录入</el-menu-item>
          <el-menu-item index="2-6">期末成绩查询</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="3">
        <i class="el-icon-trophy"></i>
        <span slot="title">成绩分析</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>